<!DOCTYPE html><html lang="en">
    <head><meta charset="UTF-8">
    <title>修改分类</title><bootstrapcss/>
</head>
<body>
    <form class="form-gropu" action="/admin.bookcate/edit" method="post">
        <table class="table table-bordered table-hover"> 
            <input type="hidden" name="id" value="<?php echo $onedata['id']; ?>"
            <tr><th>分类名</th>
                <td><input class="form-control modal-sm" type="text" name="name" value="<?php echo $onedata['name'];?>"></td></tr>
                <tr><th>所属栏目</th>
                    <td> 
                    <select class="form-control modal-sm" name="pid">
                        <option value="0">顶级栏目</option>
                        <?php foreach($data as $key => $value) { ?>
                            <option value="<?php  echo $value['id']; ?>"  
                            <?php if($onedata['pid'] == $value['id']){ echo 'selected="selected" '; } echo '>'.str_repeat("-",$value["level"]*2).$value['name']; ?>  </option>
                            <?php } ?>
                      
                    </select></td></tr>
                        <tr><th>排序</th><td><input class="form-control modal-sm" type="text" name="sort" value="<?php echo $onedata['sort'];?>"></td></tr>
                        <tr><th>关键词</th><td><input class="form-control modal-sm" type="text" name="keywords" value="<?php echo $onedata['keywords'];?>"></td></tr>
                        <tr><th>描述</th><td> <textarea class="form-control modal-sm" name="description"><?php echo $onedata['description'];?></textarea></td></tr>
                        <tr><th></th><td><input class="btn btn-success" type="submit" value="提交"></td></tr>
                    </table></form>
                    <bootstrapjs/>
                </body>
                </html>